import React from 'react';
import styles from './index.module.scss';
import TitleHeader from '../../components/TitleHeader'

console.log(1111, styles)

export default class Citylist extends React.Component {
  componentDidMount() {
    this.renderMapControl()
  }

  renderMapControl = () => {
    const map = new window.BMap.Map("container");
    const point = new window.BMap.Point(116.404, 39.915);
    map.centerAndZoom(point, 11);
  }

  renderHeader = () => {
    return (
      <TitleHeader title="地图找房"></TitleHeader>
    )
  }

  renderMap = () => {
    return (
      <div id="container"></div>
    )
  }

  render() {
    return (
      <div className={styles.mapBox}>
        {this.renderHeader()}

        {this.renderMap()}
      </div>
    )
  }
}